import xbiquge from './xbiquge';

let URL_SEARCH = "https://www.booktxt.com/search.php?keyword=%s";
let URL_HOME = "https://www.booktxt.com";
let GBK = 'GBK';
let UTF8 = 'UTF-8';

const search = (keyword) => {
    return xbiquge.search(keyword, URL_SEARCH, strategy.id);
};

const chapters = (bookId) => {
    return xbiquge.chapters(bookId, URL_HOME, GBK);
};

const content = (link) => {
    return xbiquge.content(link, GBK);
};

const strategy = {
    id: 'booktxt.com',
    name: '顶点小说(booktxt.com)',
    homepage: URL_HOME,
    search: search,
    chapters: chapters,
    content: content
};

export default strategy;
